<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1{
   width:195px;
}
.select_width{
   width:130px;
}
</style>
<input type="hidden" name="organizations/organization[0]/sequence_no" value="1" >
<input type="hidden" name="organizations/organization[0]@submit_org" value="1" >
<input type="hidden" name="organizations/organization[0]/org_code" value="<x:out select="$xmlData/data/organizations/organization[@submit_org=1]/org_code"/>" >
<div class="t_bar2" style="height:37px;"> 
		项目基本情况
	</div>
<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo1" cellspacing="1" style="table-layout:fixed;">
	<col width="20%;"/>
	<col width="20%;"/>
	<col width="15%;"/>
	<col width="15%;"/>
	<col width="15%;"/>
	<col width="15%;"/>
	
	<tr style="height:37px;">
		<td  align="right" ><span class="color_red">*</span>项目名称（中文）：</td>
		<td colspan="5" >
			<input name="proposal/zh_title" id="zh_title" label="项目名称（中文）" type="text"  class="input_text required maxlength:30" style="width:604px;"   maxlength="30" value="<x:out select="$xmlData/data/proposal/zh_title" />"/>（限30个字）
		</td>
	</tr>
	<tr style="height:37px;">
	<td  align="right" ><span class="color_red">*</span>项目名称（英文）：</td>
	<td colspan="5" >
			<input name="proposal/en_title" id="en_title" label="项目名称（英文）" type="text"  class="input_text required maxlength:100" style="width:604px;"   maxlength="200" value="<x:out select="$xmlData/data/proposal/en_title" />"/>（限200个字）
		</td>
	</tr>
	</table>
	<table class="t_css" width="100%" border="0"  cellpadding="0" id="basicInfo2" cellspacing="1" style="table-layout:fixed;height:18px">
	<col width="20%;"/>
	<col width="22%;"/>
	<col width="8%;"/>
	<col width="15%;"/>
	<col width="15%;"/>
	<col width="20%;"/>
	<tr >
		<td align="right"  ><span class="color_red">*</span>学科分类1：</td>
  		 <td   class="li_2">
          <c:set var="subject">{'id':'<x:out select="$xmlData/data/proposal/subject_code" />',
						       'name':'<x:out select="$xmlData/data/proposal/subject_name" />'}
		  </c:set>
			<cpt:tree key="technological" className="hn_iuput_kuang required" 
			onlyChooseLeaf="true" readonly="true" 
			cacheable="false"  value="${subject}" id="subject" name="proposal/subject"  
			showPattern="all" shieldPattern="-1 " onClick="initTreeValuejsdtr"   label="学科分类1" />
			<input type="hidden" id="subject_code" name="proposal/subject_code" value="<x:out select="$xmlData/data/proposal/subject_code" />"  label="${param.title}-->学科分类1"/> 
			<input type="hidden" id="subject_name" name="proposal/subject_name" value="<x:out select="$xmlData/data/proposal/subject_name" />" />
			</td>
  	 	  <td align="right">代码：</td>
  	 	<td>
  	 	<input id="subject_value" label="${param.title}-->学科分类1-->代码"
				type="text" class="gray" disabled="disabled" style="width:110px;"
				maxlength="50" name="proposal/subject_value"
				value="<x:out select="$xmlData/data/proposal/subject_value" />" />
  	 	</td>
  	 	 <td align="right" >专业评审组名称：</td>
  	 	<td>
  	 	<input id="department_value" type="hidden" name="proposal/department_value"  
  	 	label="专业评审组名称"  value="<x:out select="$xmlData/data/proposal/department_value" />"/>
            <span id="department_name"  name="proposal/department_name"><x:out select="$xmlData/data/proposal/department_name" /></span>
                
		</td>
	</tr>
	
		<tr>
		<td align="right" >学科分类2：</td>
  		 <td>
          <c:set var="subject4">{'id':'<x:out
						select="$xmlData/data/proposal/subject4_code" />','name':'<x:out
						select="$xmlData/data/proposal/subject4_name" />'}
		  </c:set>
			<cpt:tree key="technological" className="hn_iuput_kuang" cacheable="false" readonly="true" value="${subject4}" id="subject4" name="proposal/subject4"  showPattern="all" shieldPattern="-1 " onClick="initTreeValuejsdtr"   label="学科分类2" />
			<input type="hidden" id="subject4_code" name="proposal/subject4_code" value="<x:out select="$xmlData/data/proposal/subject4_code" />"  /> 
			<input type="hidden" id="subject4_name" name="proposal/subject4_name" value="<x:out select="$xmlData/data/proposal/subject4_name" />" />
			</td>
  	 	  <td align="right" >代码：</td>
  	 	<td colspan="3">
  	 	<input id="subject4_value" label="${param.title}-->学科分类2-->代码"
				type="text" class="gray" disabled="disabled" style="width:110px;"
				maxlength="50" name="proposal/subject4_value"
				value="<x:out select="$xmlData/data/proposal/subject4_value" />" />
  	 	</td>
	</tr>
	<tr >
		<td align="right" >学科分类3：</td>
  		 <td   class="li_2">
          <c:set var="subject5">{'id':'<x:out
						select="$xmlData/data/proposal/subject5_code" />','name':'<x:out
						select="$xmlData/data/proposal/subject5_name" />'}
		  </c:set>
			<cpt:tree key="technological" className="hn_iuput_kuang"  cacheable="false" readonly="true" value="${subject5}" id="subject5" name="proposal/subject5"  showPattern="all" shieldPattern="-1 " onClick="initTreeValuejsdtr"   label="学科分类名称-->学科名称3" />
			<input type="hidden" id="subject5_code" name="proposal/subject5_code" value="<x:out select="$xmlData/data/proposal/subject5_code" />"/> 
			<input type="hidden" id="subject5_name" name="proposal/subject5_name" value="<x:out select="$xmlData/data/proposal/subject5_name" />" />
			</td>
  	 	  <td align="right">代码：</td>
  	 	<td colspan="3">
  	 	<input id="subject5_value" label="${param.title}-->学科分类3-->代码"
				type="text" class="gray" disabled="disabled" style="width:110px;"
				maxlength="50" name="proposal/subject5_value"
				value="<x:out select="$xmlData/data/proposal/subject5_value" />" />
  	 	</td>
	</tr>
	</table>
	<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo3" cellspacing="1" style="table-layout:fixed;">
	<col width="20%;"/>
	<col width="20%;"/>
	<col width="15%;"/>
	<col width="15%;"/>
	<col width="15%;"/>
	<col width="15%;"/>
	<tr style="height:37px;">
		<td  align="right" ><span class="color_red">*</span>科技成果名称：</td>
		<td  colspan="2">
			<input type="text" name="proposal/tech_type_name" maxlength="100" class="input_text required" label="科技成果名称" value="<x:out select="$xmlData/data/proposal/tech_type_name" />">
		</td>
		<td  align="right"><span class="color_red">*</span>省级成果登记号：</td>
		<td  colspan="2">
			<input name="proposal/reg_no" id="reg_no" label="省级成果登记号" type="text"   class="input_text required"  maxlength="100"  value="<x:out select="$xmlData/data/proposal/reg_no" />"/>
			
		</td>
	</tr>
	
	<tr style="height:37px;">
		
  	   <td align="right" ><span class="color_red">*</span>所属国民经济行业：</td>
       <td  align="left" colspan="5" >
       		<c:set var="belong_industry">{'id':'<x:out select="$xmlData/data/proposal/belong_industry_code" />','name':'<x:out select="$xmlData/data/proposal/belong_industry_name" />'}</c:set>
       	  <cpt:tree key="belong_industry" cacheable="false" className="hn_iuput_kuang " readonly="true" value="${belong_industry}" label="所属国民经济行业"
       		id="belong_industry" name="belong_industry" showPattern="all" shieldPattern="0" onClick="initTreeValueExt2"></cpt:tree>
	        <input type="hidden" name="proposal/belong_industry_code" value="<x:out select="$xmlData/data/proposal/belong_industry_code" />" class="required"  label="所属国民经济行业"/>
	        <input type="hidden" name="proposal/belong_industry_name" value="<x:out select="$xmlData/data/proposal/belong_industry_name" />"/>
      </td>
      
	</tr>
	<tr style="height:37px;">
		<td  align="right" ><span class="color_red">*</span>计划名称：</td>
		<td colspan="2">
			  <input type="text" id="plan_name" name="proposal/plan_name" 
			  value="<x:out select="$xmlData/data/proposal/plan_name" />" maxlength="100" class="required"  label="计划名称"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>计划编号：</td>
		<td colspan="2">
			  <input type="text" id="plan_no" name="proposal/plan_no" 
			  value="<x:out select="$xmlData/data/proposal/plan_no" />" maxlength="100" class="required"  label="计划编号"/> 
		</td>
		</tr>
	<tr style="height:37px;" >
		<td  align="right" ><span class="color_red">*</span>项目开始时间：</td>
	   <td colspan="2">
		 	<c:set var="start_date"><x:out select="$xmlData/data/proposal/start_date" /></c:set>
			<cpt:date id="start_date" name="proposal/start_date" value="${start_date}" className=" required date   dateCompare:end_date " label="项目开始时间" ></cpt:date> 
	   </td>
	   <td  align="right"><span class="color_red">*</span>项目结束时间：</td>
	   <td colspan="2">
	    	<c:set var="end_date"><x:out select="$xmlData/data/proposal/end_date" /></c:set>
			<cpt:date id="end_date" name="proposal/end_date" value="${end_date}" className=" required date" label="项目结束时间" ></cpt:date> 
	   </td>
	</tr>
	
	
	<tr style="height:37px;">
		<td  align="right" ><span class="color_red">*</span>项目名称可否公布：</td>
		<td colspan="2">
			  <cpt:checkbox key="item_choose" className="required"  name="proposal/show_title" repeatColumn="2" tagType="radio" style="border: 0px; padding: 0px; margin: 0px;" onClick="setRendingType('show_title_value');"></cpt:checkbox>
         	<input type="hidden" name="proposal/show_title_value" id="show_title_value" value="<x:out select="$xmlData/data/proposal/show_title_value" />" class="required" label="项目名称可否公布"/>
         	<input type="hidden" name="proposal/show_title_name" value="<x:out select="$xmlData/data/proposal/show_title_name" />"/> 
		</td>
		<td  align="right" style="border-bottom:0px;"><span class="color_red">*</span>推荐单位（或专家）：</td>
		<td  style="border-bottom:0px;" colspan="3">
			<c:set var="recommend_type_value"><x:out select="$xmlData/data/proposal/recommend_type_value" /></c:set>
			<cpt:select id="recommend_type"  key="recommend_type"  value="${recommend_type_value}" onChange="initControlValue(this.id);setRecommend();changeTypeQhh(this.value,true);clearText();"  style="width:150px;"></cpt:select>
			<input type="hidden" id="recommend_type_value" name="proposal/recommend_type_value" class="required" value="${recommend_type_value}" label="推荐单位（或专家）">
			<input type="hidden" id="recommend_type_name" name="proposal/recommend_type_name" value="<x:out select="$xmlData/data/proposal/recommend_type_name" />">
		</td>
		
	</tr>
   <tr id="tr_show_title" style="height:37px;">
		<td align="right"  ><span class="color_red">*</span>密级：</td>
		<td colspan="2">
			<c:set var="thick_level_value"><x:out select="$xmlData/data/proposal/thick_level_value" /></c:set>
			<cpt:select id="thick_level"  key="security_deadline"  value="${thick_level_value}" onChange="initControlValue(this.id);sendtitle();"  style="width:150px;"></cpt:select>
			<input type="hidden" id="thick_level_value" name="proposal/thick_level_value"  value="${thick_level_value}" label="密级">
			<input type="hidden" id="thick_level_name" name="proposal/thick_level_name" value="<x:out select="$xmlData/data/proposal/thick_level_name" />">
		</td>
		<td  align="right" ><span class="color_red">*</span>保密期限：</td>
		<td colspan="2">
			
			<input id="show_title_scope"  type="text" name="proposal/security_deadline" maxlength="100" label="保密期限"  value="<x:out select="$xmlData/data/proposal/security_deadline" />"/>  
		</td>
		
	</tr>
	<tr id="gongbu1">
		<td align="right" ><span class="color_red">*</span>任务来源：</td>
		<td colspan="5">国家级科技计划：<br/>
		<cpt:checkbox key="mission_source5" name="mission_source5" repeatColumn="4" tagType="checkbox" style="border: 0px; padding: 0px; margin: 0px;" lastOther="true" ></cpt:checkbox>
         <input type="hidden" name="proposal/mission_source5_value" id="missionsource5" value="<x:out select="$xmlData/data/proposal/mission_source5_value" />"  label="国家级科技计划"/>
         <input type="hidden" name="proposal/mission_source5_name" value="<x:out select="$xmlData/data/proposal/mission_source5_name" />" />
		省、部级计划：<br/>
		<cpt:checkbox key="mission_source6" name="mission_source6" repeatColumn="4" tagType="checkbox" style="border: 0px; padding: 0px; margin: 0px;" lastOther="true" ></cpt:checkbox>
         <input type="hidden" name="proposal/mission_source6_value" id="missionsource6" value="<x:out select="$xmlData/data/proposal/mission_source6_value" />"  label="省、部级计划"/>
         <input type="hidden" name="proposal/mission_source6_name" value="<x:out select="$xmlData/data/proposal/mission_source6_name" />" />
		其他：<br/>
		<cpt:checkbox key="mission_source7" name="mission_source7" repeatColumn="4" tagType="checkbox" style="border: 0px; padding: 0px; margin: 0px;" lastOther="true" ></cpt:checkbox>
         <input type="hidden" name="proposal/mission_source7_value" id="missionsource7" value="<x:out select="$xmlData/data/proposal/mission_source7_value" />"  label="其他"/>
         <input type="hidden" name="proposal/mission_source7_name" value="<x:out select="$xmlData/data/proposal/mission_source7_name" />" /> 
		</td>
	</tr>
	
	<tr id="gongbu3">
		<td  align="right" ><span class="color_red">*</span>主题词：</td>
		<td colspan="5">
			  <input type="text" id="subject_headings" name="proposal/subject_headings" 
			  value="<x:out select="$xmlData/data/proposal/subject_headings" />" style="width:604px;"  class="required maxlength:100"  label="主题词"/> <br/>
			  按《国家汉语主题词表》填写3个至7个与推荐项目技术内容密切相关的主题词，每个词语间应加“；”号。
		</td>
	</tr>
	<tr id="gongbu2">
		<td align="right" ><span class="color_red">*</span>推荐单位：</td>
		<td colspan="5">
		<c:set var="recomend_org">
		{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />',
		'name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'
		}					
		</c:set> <cpt:tree id="recomend_org" key="recommended"
				cacheable="false" className="hn_iuput_kuang required selectWidth3"
				readonly="true" value="${recomend_org}" label="推荐单位"
				showPattern="all" shieldPattern="0"
				onClick="initTreeValue2_qhh">
			</cpt:tree> <input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value"
			value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" />
			<input type="hidden" id="recomend_org_name" name="proposal/recomend_org_name"
			value="<x:out select="$xmlData/data/proposal/recomend_org_name"/>" />
		</td>
	</tr>
</table>


<script type="text/javascript">





$(function(){
	setRendingType('show_title_value');
	setRecommend();
	/* setSummary(); */
});




/* function setSummary(){
	 var text1 = $("#tech_type_value").val();
	  if (text1 == "01"){
		  $("span[id='summary1']").html("技术局限性");
		  $("textarea[id='summary1']").attr("label","技术局限性");
		  $("input[id='summary1']").val("技术局限性");
		  $("a[id='downloadTemplate']").attr("onclick","return ContentDownDesc('主要技术发明.doc');");
		  
		  
		  $("span[id='text10']").text("主要技术发明");
		  
		
		  
	  }else if(text1 == "02" || text1 == "03" || text1 == "04"){
	    $("span[id='summary1']").html("科技局限性");
	    $("textarea[id='summary1']").attr("label","科技局限性");
	    $("input[id='summary1']").val("科技局限性");
	    $("a[id='downloadTemplate']").attr("onclick","return ContentDownDesc('主要科技创新.doc');");
	    
	    
	    $("span[id='text10']").text("主要科技创新");
	    
	  
	    
    }else if(text1 == "05"){
    	$("span[id='summary1']").html("研究局限性");
    	$("textarea[id='summary1']").attr("label","研究局限性");
    	$("input[id='summary1']").val("研究局限性");
    	$("a[id='downloadTemplate']").attr("onclick","return ContentDownDesc('重要科学发现.doc');");
    	
    	
    	$("span[id='text10']").text("重要科学发现");
    	
    	
    
    }else{$("span[id='summary1']").html("技术局限性");
		  $("textarea[id='summary1']").attr("label","技术局限性");
		  $("input[id='summary1']").val("技术局限性");
		  $("a[id='downloadTemplate']").attr("onclick","return ContentDownDesc('主要技术发明.doc');");
		  
		  
		  $("span[id='text10']").text("主要技术发明");
		  
		  
		  }
}
 */


function clearText(){
	
	  $("input[id='file_code']").val("");
	  $("[id='uploadsuccess']").hide();
	  
	  
	  $("textarea[id='summary1']").text("");
	  $("input[id='proposal/goal/summary1_hidden']").val("");
} 

/* 
	function setParent(id,showFlag){
		var parentTr = $("#" + id).parent();
		  if(parentTr.is('tr')){
			  if(showFlag)
			  	parentTr.show();
			  else
			  	parentTr.hide();
		  }else{
			  if(showFlag)
			  	  parentTr.parent().show();
			  else
				  parentTr.parent().hide();
		  }
	}
 */

/* $(document).ready(function() {
	setAppOrgInfoShowHidden();
});

function setAppOrgInfoShowHidden(){
	var type = $("#tech_type_value").val();
	if(type=='05'){
		//hidden
			$("#div_app_org_info").hide();
		$("#div_app_org_info_other").show();
		$("#projectQhh").hide();
		
		$("#title11").text("主要论文专著他引情况及科学意义和价值");
		
		
	}else{
		//show
		$("#div_app_org_info").show();
		$("#div_app_org_info_other").hide();
		$("#projectQhh").show();
		
		$("#title11").text("应用情况及效益");
		
	}
}
 */

function initTreeValue2_qhh(treeId, treeNode) {
  	//针对单位性质
  	if (( treeNode && treeNode.isParent)) {
		scmWarn("请选择具体的"+$("#" + treeId).attr("label"));
			$("#" + treeId).val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
			return false;
	}
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			//str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
		$("#" + treeId).val(str);
		
	
		setInformation(treeNode.id);
	}





	function setInformation(re_org_code){
		
		if(re_org_code !=null){
		 $.ajax({
	         type: "post",
	         url: "${ctx}/proposal/get-reorg-contactinfo",
	         data: {re_org_code:re_org_code},
	         dataType: "json",
	         success: function(data){
	        	            /*   alert(JSON.stringify(data) );
	        	            alert(data.PNAME); */
	        	       if(data.PNAME == null || data.TEL == null || data.EMAIL == null || data.FAX == null){
	        	    	   irisValaddMsg("请联系相应的推荐单位完善单位信息");
	        	       }else{
	        	    	   $("#reco_lixiren").val(data.PNAME);
	                   $("#reco_mobile").val(data.TEL);
	                   $("#reco_email").val(data.EMAIL);
	                   $("#reco_fax").val(data.FAX);
	                   }
	                  }
	     });
		}
	}

//显示全名称路径
function buildName(treeNode, params){
	var str = treeNode.name;
	var obj = treeNode.parentNode;
	while(obj!=null){
		//str =obj.name+"-"+str;
		obj = obj.parentNode;
	}
	return str;
}



function initTreeValueExt2(treeId, treeNode) {

		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			//str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
		$("#" + treeId).val(str);

}




function initTreeValue2(treeId, treeNode) {
  	//针对单位性质
  	if (( treeNode && treeNode.level == 0)) {
		scmWarn("请选择具体的"+$("#" + treeId).attr("label"));
			$("#" + treeId).val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
			return false;
	}
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			//str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
		$("#" + treeId).val(str);
		initTreeValue2CallBack();
	}
	
/* 	function setRequired(){
		var isSecret = $("#issecret").val();
		if(isSecret == '01'){
			$("#approve_no").addClass("required");
			$("#approve_no").parent().prev().html("<span class='color_red'>*</span>密级、保密期限及批准号：");
		}
		else{
			$("#approve_no").removeClass("required");
			$("#approve_no").parent().prev().html("密级、保密期限及批准号：");
		}
	} */
	
	
	/* function changeTypeQhh(v_checked_id,v_clear){
		var v_checked=v_checked_id;
		$("#tech_type").find("option[value='01']").remove();
		$("#tech_type").find("option[value='02']").remove();
		$("#tech_type").find("option[value='03']").remove();
		$("#tech_type").find("option[value='04']").remove();
		$("#tech_type").find("option[value='05']").remove();
		if(v_checked=='01'){
			$("#tech_type").append("<option value='01' title='技术发明'>技术发明</option>");
			$("#tech_type").append("<option value='02' title='技术开发'>技术开发</option>");
			$("#tech_type").append("<option value='03' title='技术推广'>技术推广</option>");
			$("#tech_type").append("<option value='04' title='社会公益'>社会公益</option>");
			$("#tech_type").append("<option value='05' title='基础研究'>基础研究</option>");
		}else{
			$("#tech_type").append("<option value='01' title='技术发明'>技术发明</option>");
			$("#tech_type").append("<option value='05' title='基础研究'>基础研究</option>");
		}
		if(v_clear){
			$("#tech_type").find("option[value='']").attr("selected",true);
			$("#tech_type_value").val("");
		}
		
	} */
	
	
	function setRendingType(obj){
		var value =$("#"+obj).val();
		if(value == '1'){
				$("#tr_show_title").show();
				//$("#show_title_scope").parents("td").find("[class='datepick-trigger']").attr('style','padding-left: 3px; cursor: pointer; vertical-align: middle;');
				$("#show_title_scope").removeAttr('disabled');
				$("#thick_level_value").attr("class","required");
				$("#show_title_scope").attr("class","required");
				$("#gongbu1").attr("class","li_1");
				$("#gongbu3").attr("class","li_2");
				$("#gongbu2").attr("class","li_1");
				//$("#show_title_scope").parents("td").find("[class='datepick-trigger']").removeAttr('disabled');
		}else{
			   $("#tr_show_title").hide();
			   $("#gongbu1").attr("class","li_2");
				$("#gongbu3").attr("class","li_1");
				$("#gongbu2").attr("class","li_2");
				$("#thick_level").val("");
				$("#thick_level_value").val("");
				$("#thick_level_name").val("");
				$("#show_title_scope").val("");
				$("#thick_level_value").attr("class","");
				$("#show_title_scope").attr("class","");
		}
	}
	function sendtitle(){
		var thick_level_value=$("#thick_level_value").val();
		if(thick_level_value > 0 && thick_level_value < 4){
			alert("项目涉密，建议不申报，请咨询省科技厅。");
		}
		
	}
function initTreeValuejsdtr(treeId, treeNode) {
			if (( treeNode && treeNode.level == 0)) {
				scmWarn($("#" + treeId).attr("label")
						+ messageTip.researchAreaInvalidDisciplineCode);
				$("#" + treeId).val("");
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_code']").val("");
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_name']").val("");
				return false;
			}else if(treeNode.level == 1 && treeNode.isParent){
				scmWarn("请选择下面的子节点");
				$("#" + treeId).val("");
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_code']").val("");
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_name']").val("");
				return false;
			}else{
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_code']").val(treeNode.id);
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_name']").val(treeNode.name);
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_value']").val(treeNode.id);
			}
	  	
			
		var oldval = $("#" + treeId).parents("td").find("[name$='" + treeId + "_code']").val();
		var oldname = $("#" + treeId).parents("td").find("[name$='" + treeId + "_name']").val();
		oldval = $.trim(oldval);
		oldname = $.trim(oldname);
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		/* $("#" + treeId).parents("td").find("[name$='" + treeId + "_all_name']").val(str); */
		if(treeId=="subject"){
			if(treeNode.level > 1){
				$("#department_name").text(treeNode.parentNode.parentNode.name);
				$("#department_value").val(treeNode.parentNode.parentNode.id);
			}else{
				$("#department_name").text(str);
				$("#department_value").val(treeNode.id);
			}
			
		}
		
		$("#" + treeId + "_value").val(treeNode.id);

	}
function initTreeValueExt(treeId, treeNode) {

	if (( treeNode && treeNode.level == 0)) {
		scmWarn($("#" + treeId).attr("label")+"不能选择第一级，请选择它的子级！");
			$("#" + treeId).val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
			return false;
	}
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			//str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
		$("#" + treeId).val(str);

}
function setEmptyValueForTree(id){
	$("#"+id).val("");
	$("#"+id+"_code").val("");
	$("#"+id+"_value").val("");
	$("#"+id+"_name").val("");
	$("#" + id).parents("td").find("[name$='" + id + "_code'],[id$='" + id + "_code']").val("");
	$("#" + id).parents("td").find("[name$='" + id + "_value'],[id$='" + id + "_value']").val("");
	$("#" + id).parents("td").find("[name$='" + id + "_name'],[id$='" + id + "_name']").val("");
	if(id=="subject"){
		$("#department_name").text("");
		$("#department_value").val("");
	}
	
}
function setRecommend(){
	var recommend_type = $("#recommend_type_value").val();
	if(recommend_type == '02'){   //专家推荐
		$("#tab10").show();
		$("#gongbu2").hide();
		$("#recomend_org").val("");
		$("#recomend_org_value").val("");
		$("#recomend_org_name").val("");
		$("#recomend_org").removeClass("required");
		/* $("#recPro_upload").find("input[id='file_code']").attr("class","required"); */
	}else if(recommend_type == '01'){     //单位推荐
	
		$("#tab10").hide();
		$("#gongbu2").show();
		$("#recomend_org").addClass("required");
		$("#recPro_upload").find("input[id='file_code']").val("");
		$("#recPro_upload").find("span[id='file_name']").text("");
		$("#recPro_upload").find("span[id='file_date']").text("");
		$("#recPro_upload").find("tr[id='uploadsuccess']").hide();
		$("#recPro_upload .file").val("");
	}else{
		$("#tab10").hide();
		$("#gongbu2").hide();
		$("#recomend_org").val("");
		$("#recomend_org_value").val("");
		$("#recomend_org_name").val("");
		$("#recomend_org").removeClass("required");
		$("#recPro_upload").find("input[id='file_code']").val("");
		$("#recPro_upload").find("span[id='file_name']").text("");
		$("#recPro_upload").find("span[id='file_date']").text("");
		$("#recPro_upload").find("tr[id='uploadsuccess']").hide();
		$("#recPro_upload .file").val("");
	}
}
function missionsource()
{
	var missionsource2=$("#missionsource5").val();
	var missionsource3=$("#missionsource6").val();
	var missionsource4=$("#missionsource7").val();
	if(missionsource2=="" && missionsource3=="" && missionsource4==""){
		return true;
	}
	return false;
}

</script>

